package com.pureut.equipment.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pureut.equipment.domain.InspectionItemPlan;
import com.pureut.equipment.domain.MaintenancePlan;
import com.pureut.equipment.domain.PatrolItemPlan;
import com.pureut.equipment.domain.PlannedAllocation;
import com.pureut.equipment.domain.vo.InspectionWorkOrderVo;
import com.pureut.equipment.domain.vo.MaintenanceWorkOrderVo;
import com.pureut.equipment.domain.vo.PatrolWorkOrderVo;
import com.pureut.equipment.mapper.InspectionItemPlanMapper;
import com.pureut.equipment.mapper.MaintenancePlanMapper;
import com.pureut.equipment.mapper.PatrolItemPlanMapper;
import com.pureut.equipment.mapper.PlannedAllocationMapper;
import com.pureut.equipment.service.*;
import com.pureut.equipment.util.TimeUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * 定时任务控制层
 */
@RestController
@RequestMapping("/schedulignTask")
public class SchedulingTaskController {

    @Resource
    SchedulingTaskService schedulingTaskService;


    /**
     * 触发生成工单
     */
    @PostMapping("/generatingWorkOrder")
    public void generationWorkOrder() throws Exception {
        schedulingTaskService.generationWorkOrder();
    }
}
